import request from '@/utils/request'
/*------get部门数据--------*/
export function getAreasData(query) {
  return request({
    url: '/api/system/area/',
    method: 'get',
    params: query
  })
}

/*------add部门数据--------*/
export function addAreaData(data) {
  return request({
    url: '/api/system/area/',
    method: 'post',
    data
  })
}
/*------edit部门数据--------*/
export function editAreaData(obj) {
  return request({
    url: '/api/system/area/'+obj.id+'/',
    method: 'put',
    data:obj
  })
}
/*------delete部门数据--------*/
export function delAreaData(pk) {
  return request({
    url: '/api/system/area/'+pk+'/',
    method: 'delete',
  })
}
